package.path = package.path .. ';/home/ubuntu/IMDT_GameDev/?.lua';

if _VERSION ~= "Lua 5.4" then
    error "Use lua 5.4"
end

function string_split(inputstr, sep)
    if sep == nil then sep = "%s" end
    local t = {}
    for str in string.gmatch(inputstr, "([^" .. sep .. "]+)") do
        table.insert(t, str)
    end
    return t
end

local str="ahh\nhh"

local res=string_split(str,"\n")


print(#res)
for i, v in ipairs(res) do
    print(v)
end